import Vue from 'vue'
import Router from 'vue-router'
import login from '../components/login.vue'
import register from '../components/register.vue'
import menu from '../view/menu.vue'
import table from '../components/table.vue'
import chart from '../components/chart.vue'
export default new Router({
	mode: 'hash',
	routes: [{
			path: '/',
			name: 'login',
			meta: {
				title: '登录'
			},
			component: login,
		},
		{
			path: '/register',
			name: 'register',
			meta: {
				title: '注册'
			},
			component: register,
		},
		{
			path: '/menu',
			name: 'menu',
			meta: {
				title: '主页'
			},
			component: menu,
			children: [{
					path: '/menu/table',
					component: table,
					meta: {
						title: '主页'
					},
				},
				{
					path: '/menu/chart',
					component: chart,
					meta: {
						title: '主页'
					},
				}
			],
		}
	],
});
